home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / ShutDown.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  1.8 KB  |  92 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ShutDown.a
  3. ;
  4. ;    Contains:    Shutdown Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__SHUTDOWN__') = 'UNDEFINED' THEN
  21. __SHUTDOWN__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  30.     include 'MixedMode.a'
  31.     ENDIF
  32.  
  33. sdOnPowerOff                    EQU        1                    ;call procedure before power off.
  34. sdOnRestart                        EQU        2                    ;call procedure before restart.
  35. sdOnUnmount                        EQU        4                    ;call procedure before unmounting.
  36. sdOnDrivers                        EQU        8                    ;call procedure before closing drivers.
  37. sdRestartOrPower                EQU        3                    ;call before either power off or restart.
  38.  
  39. ;
  40. ; pascal void ShutDwnPower(void)
  41. ;
  42.     IF ¬ GENERATINGCFM THEN
  43.         Macro
  44.         _ShutDwnPower
  45.             move.w    #$0001,-(sp)
  46.             dc.w     $A895
  47.         EndM
  48.     ELSE
  49.         IMPORT_CFM_FUNCTION    ShutDwnPower
  50.     ENDIF
  51.  
  52. ;
  53. ; pascal void ShutDwnStart(void)
  54. ;
  55.     IF ¬ GENERATINGCFM THEN
  56.         Macro
  57.         _ShutDwnStart
  58.             move.w    #$0002,-(sp)
  59.             dc.w     $A895
  60.         EndM
  61.     ELSE
  62.         IMPORT_CFM_FUNCTION    ShutDwnStart
  63.     ENDIF
  64.  
  65. ;
  66. ; pascal void ShutDwnInstall(ShutDwnUPP shutDownProc, short flags)
  67. ;
  68.     IF ¬ GENERATINGCFM THEN
  69.         Macro
  70.         _ShutDwnInstall
  71.             move.w    #$0003,-(sp)
  72.             dc.w     $A895
  73.         EndM
  74.     ELSE
  75.         IMPORT_CFM_FUNCTION    ShutDwnInstall
  76.     ENDIF
  77.  
  78. ;
  79. ; pascal void ShutDwnRemove(ShutDwnUPP shutDownProc)
  80. ;
  81.     IF ¬ GENERATINGCFM THEN
  82.         Macro
  83.         _ShutDwnRemove
  84.             move.w    #$0004,-(sp)
  85.             dc.w     $A895
  86.         EndM
  87.     ELSE
  88.         IMPORT_CFM_FUNCTION    ShutDwnRemove
  89.     ENDIF
  90.  
  91.     ENDIF ; __SHUTDOWN__
  92.